package org.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.sql.Timestamp;
import java.time.LocalDateTime;


@Data
@TableName("ruletable")
public class RuleEntity {
    @TableId(value = "rule_id", type = IdType.AUTO)
    private Integer ruleId; // 对应数据库的 RuleID

    @TableField("rule_name")
    private String ruleName; // 对应数据库的 RuleName

    @TableField("rule_question_type")
    private String ruleQuestionType; // 对应数据库的 RuleQuestionType

    @TableField("rule_grade")
    private float ruleGrade; // 对应数据库的 RuleGrade

    @TableField("rule_difficulty")
    private Byte ruleDifficulty; // 对应数据库的 RuleDifficulty

    @TableField("rule_points")
    private String rulePoints; // 对应数据库的 RulePoints

    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime; // 对应数据库的 create_time

    @TableField("create_by")
    private Long createBy; // 对应数据库的 create_by
}

